home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3dm / old-compression / clSetErrorHandler.z / clSetErrorHandler
Encoding:
Text File  |  2002-10-03  |  3.1 KB  |  67 lines

  1.  
  2.  
  3.  
  4. ccccllllSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr((((3333ddddmmmm))))                                  ccccllllSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      clSetErrorHandler - Select an alternate error handling routine
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ccccllll....hhhh>>>>
  13.  
  14.      CCCCLLLLeeeerrrrrrrrFFFFuuuunnnncccc ccccllllSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr((((CCCCLLLLeeeerrrrrrrrFFFFuuuunnnncccc eeeeffffuuuunnnncccc))))
  15.  
  16. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  17.      _e_f_u_n_c  A pointer to an error handling routine declared as
  18.             vvvvooooiiiidddd EEEErrrrrrrroooorrrrFFFFuuuunnnncccc((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ccccooooddddeeee,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ffffoooorrrrmmmmaaaatttt,,,, ............))))
  19.  
  20. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.      ccccllllSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr allows overriding of the Compression Library's default
  22.      error handling routine, which prints a message to stderr.
  23.  
  24.      The arguments that are passed to the error handling routine are a handle
  25.      to the processing object, an error code, and a printf-like string
  26.      optionally followed with printf-like arguments.
  27.  
  28.      The error codes are listed in <<<<ddddmmmmeeeeddddiiiiaaaa////ccccllll....hhhh>>>>.
  29.  
  30.  
  31. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  32.      ccccllllSSSSeeeettttEEEErrrrrrrroooorrrrHHHHaaaannnnddddlllleeeerrrr returns a pointer to the previous error handling
  33.      routine.
  34.  
  35.  
  36. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  37.           #include <dmedia/cl.h>
  38.  
  39.           CLerrFunc originalErrorHandler;
  40.            ...
  41.           void silentCLError(CLhandle handle, int code, const char* format, ...)
  42.           {
  43.                /* ignore all CL errors */
  44.           }
  45.            ...
  46.           originalErrorHandler = clSetErrorHandler(silentCLError);
  47.           /* CL errors here will go unnoticed */
  48.            ...
  49.           clSetErrorHandler(originalErrorHandler);
  50.           /* back to normal reporting of CL errors */
  51.            ...
  52.  
  53.  
  54. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  55.      CLintro(3dm), clError(3dm), stdarg(5)
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.